# !/usr/bin/env python
# -*- coding: UTF-8 -*-
# author: 'xiazhiquan'
# date: '11-7-31'

import threading

class MonitorWorker(threading.Thread):
    def __init__(self, server, func):
        self.server = server
        self.func = func

    def run(self):
        while True:
            apply(func, self.server)

